package com.meritdata.cloud.data.standard.directory.service;

import java.util.List;

import com.meritdata.cloud.data.base.ResultData;
import com.meritdata.cloud.data.standard.directory.entity.TdDataDomain;
import com.meritdata.cloud.data.standard.directory.entity.TdDataLayer;

/**
 * 数据域服务
 * 
 * @author Lee
 *
 */
public interface IDataDomainService {

	/**
	 * 创建数据域
	 * 
	 * @param name
	 * @param code
	 * @param description
	 * @param layerId
	 *            所属层id
	 * @param domainId
	 *            所属域id
	 * @param userId
	 * @return
	 */
	ResultData create(String name, String code, String description, Long layerId, Long domainId, String userId);

	/**
	 * 删除域
	 * 
	 * @param id
	 * @return
	 */
	ResultData delete(Long id);

	/**
	 * 更新域
	 * 
	 * @param name
	 * @param code
	 * @param description
	 * @param id
	 * @param userId
	 * @return
	 */
	ResultData update(String name, String code, String description, Long id, String userId);

	/**
	 * 获取域信息
	 * 
	 * @param id
	 * @return
	 */
	TdDataDomain get(Long id);
	
	/**
	 * 获取域
	 * @param layerId
	 * @return
	 */
	List<TdDataDomain> listByLayerId(Long layerId);
	
	List<TdDataDomain> listByDomainId(Long domainId);

}
